This demo program shows how to use the QTImageDrawer and its associated Paintable object to paint an image and some text using Java's imaging services (awt.Image and awt.Graphics).
The QTImageDrawer uses Java's PixelGrabber class to get the pixels that have been drawn by the Paintable's paint method and uses QuickTime's image services to draw the results of this to the screen.
The QTImageDrawer is set as a client of the QTCanvas so that the results of this are presented to the user.
A QTSession.open will perform a gestalt check to ensure that QuickTime is present and is initialized. This is a required call before any QuickTime Java classes can be used.
When the user closes the window the program will quit, first calling QTSession.close to terminate QuickTime. It is necessary for programs to call QTSession.close if they have previously called QTSession.open in order to shut down QuickTime properly.